Page({
  onLoad() {
    // 获取访客列表
    this.getVistorList()
  },

  async getVistorList() {
    const {
      code,
      data: { rows },
    } = await wx.http({
      url: '/visitor',
      data: {
        current: 1,
        pageSize: 1000,
      },
    })
    if (code !== 10000) return wx.toast()

    // console.log(data)
    this.setData({
      list: rows,
    })
  },

  goPassport(e) {
    wx.navigateTo({
      url: '/visitor_pkg/pages/passport/index?id=' + e.mark.id,
    })
  },
})
